<%@page import="java.util.UUID"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/pages/common/taglib.jsp" %>
<%
    String uuid = UUID.randomUUID().toString();
    request.setAttribute("uuid", uuid);
%>
<form id="abilityTreeSearch" style="display: none;" class="box-body form-float"></form>
<form id="userRelGridSearch" style="display: none;" class="box-body form-float"></form>
<div class="row">
	<div class="col-md-4" >
		<div class="box box-primary">
			<div class="box-header with-border">
				<h3 class="box-title">
				</h3>
				<div class="box-tools pull-right" id="abilityTreeToolBar">
				</div>
			</div>
			<div class="box-body">
				<div id="abilityTree" class="ztree">
		   		</div>
			</div>
		</div>
	</div>
	<div class="col-md-8" >
		<div class="box box-primary">
			<div class="box-header with-border">
				<h3 class="box-title">
				</h3>
				<div class="box-tools pull-right" id="userRelGridToolBar">
				</div>
			</div>
			<div class="box-body">
				<table id="userRelGrid">
		   		</table>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
$(function(){
	var uuid = '${uuid}';
	requirejs(['wiseMen/dataModel/QueryDefTreeTpl','wiseMen/dataModel/QueryDefTpl'],function(QueryDefTreeTpl,QueryDefTpl){
		var abilityTree=new QueryDefTreeTpl({
			code:"PF_USER_ABILITY",
			modelCode:"PF_USER_ABILITY",
			searchBarType:'dialog',
			searchDiv:"#abilityTreeSearch",//查询定义栏
			toolBarDiv:"#abilityTreeToolBar",//工具栏定义栏
			treeDiv:"#abilityTree",//grid表格
			onSelect:function(row){
				userRelGrid.search({
					ABILITYID:row.ID
				});
			}
		});
		
		var userRelGrid=new QueryDefTpl({
			code:"PF_USER_ABILITY_REL",
			searchBarType:"dialog",
			searchDiv:"#userRelGridSearch",//查询定义栏
			toolBarDiv:"#userRelGridToolBar",//工具栏定义栏
			gridDiv:"#userRelGrid",//grid表格
			onSelect:function(row){
			},
			queryDatas:{
				ABILITYID:"-1"
			}
		});
		
	});
});
</script>